solve the trigonometric equation